<?php $data = get_option('wp-hukd'); ;?>

<div class="hukd-widget">
	<div class="hukd-heading"><?=$data['heading_text'];?></div>
	<?php if(hukd_test_key()){?>
		<?php
			$deals=hukd_fetch(array('order'=>$data['order'],'min_temp'=>$data['min_temp'],'results_per_page'=>$data['results_per_page'],'forum'=>$data['forum'],'category'=>$data['category'],'search'=>$data['search']));
			
			if(count($deals)>0)
			{ 
			
				foreach($deals as $key => $item)
				{
				?>
				<div class="hukd-item">
					<div class="temperature"><?=$item->temperature;?>&deg;</div>
					<a href="<?=$item->deal_link;?>"><?=$item->title;?></a>
				</div>
				<?
				}
			}
			else
			{
				?>
				<div class="hukd-item no-deals-found">
					No deals found.
				</div>
				
				<?
			}
		?>
	<? } ?>
	<div class="powered-by">
		Powered by <a href="http://www.hotukdeals.com">HUKD</a>
	</div>

</div>